package com.yuyue.dronesystem.beans;

import java.util.Objects;

/**
 * EncasementItem
 */
public class EncasementItem {

    // 容器ID
    private Long boxId;
    // 容器空间位置
    private SpatialPosition spatialPosition;

    public EncasementItem() {
    }

    public EncasementItem(Long boxId, SpatialPosition spatialPosition) {
        this.boxId = boxId;
        this.spatialPosition = spatialPosition;
    }

    public Long getBoxId() {
        return this.boxId;
    }

    public void setBoxId(Long boxId) {
        this.boxId = boxId;
    }

    public SpatialPosition getSpatialPosition() {
        return this.spatialPosition;
    }

    public void setSpatialPosition(SpatialPosition spatialPosition) {
        this.spatialPosition = spatialPosition;
    }

    public EncasementItem boxId(Long boxId) {
        this.boxId = boxId;
        return this;
    }

    public EncasementItem spatialPosition(SpatialPosition spatialPosition) {
        this.spatialPosition = spatialPosition;
        return this;
    }

    @Override
    public boolean equals(Object o) {
        if (o == this)
            return true;
        if (!(o instanceof EncasementItem)) {
            return false;
        }
        EncasementItem encasementItem = (EncasementItem) o;
        return Objects.equals(boxId, encasementItem.boxId) && Objects.equals(spatialPosition, encasementItem.spatialPosition);
    }

    @Override
    public int hashCode() {
        return Objects.hash(boxId, spatialPosition);
    }

    @Override
    public String toString() {
        return "{" +
            " boxId='" + getBoxId() + "'" +
            ", spatialPosition='" + getSpatialPosition() + "'" +
            "}";
    }    
}